package com.youngball.shiro.service;


import com.youngball.business.utill.ConstantClass;
import com.youngball.shiro.entity.ChildResource;
import com.youngball.shiro.entity.User;

import java.util.List;
import java.util.Set;


/**

 */
public interface UserService {

    /**
     * 创建用户
     * @param user*/

    public User createUser(User user);

    public User updateUser(User user);


    public void deleteUser(Long userId);

  /*  *
     * 修改密码
     * @param userId
     * @param newPassword*/

    public void changePassword(Long userId, String newPassword, String oldPassword);

    public void resetPassword(Long userId, String newPassword);

    public User getEncodeUser(User user);

    User findOne(Long userId);

    List<User> findAll();

 /*   *
     * 根据用户名查找用户
     * @param username
     * @return*/

    public User findByUsername(String username);



    public User findByMyUsername(String username);


    public User findByOrganization(Long id);

    public Set<String> findRoles(String username);

    public Set<String> findPermissions(String username);
    public Set<String> findMyPermissions(String username);

    public List<User> findAllUser();

  public   List<ChildResource>  findMenuPersion(User user);

    public List<ConstantClass> getBackPersion(String username);
}
